<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDistributionUpgradeOptionGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('distribution_upgrade_option_goods', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('distribution_upgrade_options_id')->default(0)->comment('升级条件id');
            $table->bigInteger('goods_id')->default(0)->comment('商品id');
            $table->string('upc')->default('')->comment('upc');
            $table->integer('num_require')->default(0)->comment('所需购买数量');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('distribution_upgrade_option_goods');
    }
}
